package com.bdqn.ch08.service.impl;

import com.bdqn.ch08.mapper.StorageMapper;
import com.bdqn.ch08.pojo.Storage;
import com.bdqn.ch08.service.StorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * StorageServiceImpl
 *
 * @aurhor Administrator  whs
 * @since 2024/7/24
 */
@Service("storageService")
public class StorageServiceImpl implements StorageService {

    @Autowired  //@ Resource
    private StorageMapper storageMapper;

    /**
     * 添加 入库信息
     *
     * @param storage
     * @return
     */
    @Override
    public int addStorage(Storage storage) {
        return storageMapper.addStorage(storage);
    }

    /**
     * 修改 入库信息
     *
     * @param storage
     * @return
     */
    @Override
    public int updStorage(Storage storage) {
        return storageMapper.updStorage(storage);
    }

    /**
     * 删除 入库信息
     *
     * @param id
     * @return
     */
    @Override
    public int delStorage(int id) {
        return storageMapper.delStorage(id);
    }


    public StorageMapper getStorageMapper() {
        return storageMapper;
    }

    public void setStorageMapper(StorageMapper storageMapper) {
        this.storageMapper = storageMapper;
    }
}
